package stone;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.Reader;

public class LexerRunner {
    public static void main(String[] args) throws ParseException, FileNotFoundException {
        File file=new File("src/test.txt");
        if (!file.exists()){
            System.out.println("file"+file.getAbsolutePath()+" not exit");
            return;
        }
        Reader reader=new FileReader(file);
        Lexer lexer=new Lexer(reader);
        Token t=lexer.read();
        while (t !=Token.EOF){
            System.out.println("=>"+t.getText()+","+t.getType());
            t=lexer.read();
        }
    }
}
